﻿Imports System.Data.SqlClient
Imports System.ComponentModel

Public Class cls_alerta_

#Region "Variables ..."
    Private int_idalerta As Integer = 0
    Private dte_fecha As DateTime = New System.DateTime(Now.Year, 1, 1)
    Private dte_hora As DateTime = New System.DateTime(Now.Year, 1, 1)
    Private int_importancia As enu_importancia = 0
    Private int_orden As Integer = 0
    Private str_descripcion As String = ""
    Private bit_pendiente As Boolean = False
    Private int_tipo As enu_tipo = 0

    Private col_Items As Collections.Generic.List(Of cls_alerta_) = Nothing

    Private obj_tarea As cls_tarea_ = Nothing


    Public Enum enu_tipo
        <Description("Otros")> otros = 0
        <Description("Tareas")> tareas = 1
        <Description("Cumpleaños")> cumpleaños = 2
    End Enum

    Public Enum enu_importancia
        <Description("Baja")> baja = 0
        <Description("Media")> media = 1
        <Description("Alta")> alta = 2
    End Enum

    Public Overrides Function ToString() As String
        Return "(" & EnumDescription(tipo) & ") " & descripcion
    End Function
#End Region

#Region "Propiedades ..."
    Property idalerta() As Integer
        Get
            idalerta = int_idalerta
        End Get
        Set(ByVal value As Integer)
            int_idalerta = value
        End Set
    End Property
    Property fecha() As DateTime
        Get
            fecha = dte_fecha
        End Get
        Set(ByVal value As DateTime)
            dte_fecha = value
        End Set
    End Property
    Property hora() As DateTime
        Get
            hora = dte_hora
        End Get
        Set(ByVal value As DateTime)
            dte_hora = value
        End Set
    End Property
    Property importancia() As enu_importancia
        Get
            importancia = int_importancia
        End Get
        Set(ByVal value As enu_importancia)
            int_importancia = value
        End Set
    End Property
    Property orden() As Integer
        Get
            orden = int_orden
        End Get
        Set(ByVal value As Integer)
            int_orden = value
        End Set
    End Property
    Property descripcion() As String
        Get
            descripcion = str_descripcion
        End Get
        Set(ByVal value As String)
            str_descripcion = value
        End Set
    End Property
    Property pendiente() As Boolean
        Get
            pendiente = bit_pendiente
        End Get
        Set(ByVal value As Boolean)
            bit_pendiente = value
        End Set
    End Property
    Property tipo() As enu_tipo
        Get
            tipo = int_tipo
        End Get
        Set(ByVal value As enu_tipo)
            int_tipo = value
        End Set
    End Property

    Property tarea() As cls_tarea_
        Get
            Return obj_tarea
        End Get
        Set(ByVal value As cls_tarea_)
            obj_tarea = value
        End Set
    End Property

    Property Items() As Collections.Generic.List(Of cls_alerta_)
        Get
            Items = col_Items
        End Get
        Set(ByVal value As Collections.Generic.List(Of cls_alerta_))
            col_Items = value
        End Set
    End Property

#End Region

    Public Function CargarTodos() As Boolean
        Dim recordatorio_ As New cls_recordatorio_

    End Function

End Class
